package com.butterfly.service;

import javax.inject.Inject;
import javax.inject.Named;

import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.butterfly.domain.dao.UserDAO;
import com.butterfly.domain.entity.User;

@Named
@Transactional(readOnly=true)
public class UserServiceImpl implements UserService {

	@Inject
	private UserDAO userDAO;
	
	@Override
	@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED, readOnly = false)
	public void saveUser(User user) { 
		userDAO.save(user);
	}

}
